
<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="#op/notify_internal">站内消息管理</a>
            </li>
        </ol>
    </div>

    <div class="topbar-right">
        <div class="btn btn-default btn-sm light fw600 ml10" id="addNewItem"><span class="fa fa-plus pr5"></span>创建消息
        </div>
    </div>
</header>

<section id="content" class="animated fadeIn">
    <div class="panel overflow" >
        <table class="table table-striped fs13" id="main-list">
            <thead>
            <tr class="bg-light">
                <th>ID</th>
                <th>发送对象</th>
                <th>标题</th>
                <th>内容</th>
                <th>创建时间</th>
                <th>最后更新时间</th>
            </tr>
            </thead>
            <tbody class="admin-form">
            <% _.each(items, function(item){ %>
            <tr data-id="<%= item.id %>" >
                <td><%= item.id %></td>
                <td><%= item.user_id %></td>
                <td><%= item.content.title %></td>
                <td><%= item.content.body.substr(0, 15) %>...</td>
                <td><%= item.created_at %></td>
                <td class="text-left">
                    <a class="glyphicons glyphicons-pencil modifyItem" href="javascript:;"></a>
                    <a class="glyphicons glyphicons-remove_2 delete-item" href="javascript:;"></a>
                </td>
            </tr>
            <%
            }) %>
            </tbody>
        </table>
    </div>

    <div><div class="pull-left" id="page-tips"></div><div id="paginator"></div></div>
</section>


<div id="addNewItemPanel" class="popup-basic popup-lg bg-none mfp-with-anim mfp-hide">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-pencil"></i></span>
            <span class="panel-title">创建消息</span>
        </div>
        <div class="panel-body">

            <form class="form-horizontal ml15" id="content-form" role="form">
                <div class="form-group">
                    <label class="col-md-3 control-label">发送对象:</label>
                    <div class="col-md-6">
                        <input type="text" id="user_id" class="form-control" value="<%= searched.user_id  %>"
                               placeholder="请输入用户ID，多个用逗号分割" data-field="user_id" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">标题：</label>
                    <div class="col-md-6">
                        <input type="text" id="notify_title" class="form-control" value="<%= searched.notify_title  %>"
                               placeholder="请输入标题" data-field="notify_title" required>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">内容：</label>
                    <div class="col-md-6">
                        <textarea title="用户ID" id="notify_info" class="gui-textarea h-200"
                                  style="width:100%;padding: 10px" data-field="notify_info"
                                  placeholder="请输入内容" required></textarea>
                    </div>
                </div>

            </form>
        </div>
        <div class="panel-footer text-right">
            <button class="btn btn-default" type="button" id="cancelAddNewItem">取消</button>
            <button class="btn btn-primary" type="button" id="confirmAddNewItem">确定</button>
        </div>
    </div>
</div>
